package com.itheima.test.lambda;

public class lambda04 {
    public static void main(String[] args) {
        getaddHander(new AddHandler() {
            @Override
            public int getadd(int x, int y) {
                return x+y;
            }
        });
        getaddHander(( x, y)-> x+y);
    }
    public static void getaddHander(AddHandler addHandler){
       int result= addHandler.getadd(10,20);
        System.out.println(result);
    }
}
interface AddHandler{
    int  getadd(int x,int y);
}
